﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using EuroManager.Presentation.WebPortal.GameViewer.Models;

namespace EuroManager.Presentation.WebPortal.GameViewer.Updates
{
    public class ClockUpdate : IGameUpdate
    {
        private Clock clock;
        private TimeSpan time;

        public ClockUpdate(Clock clock, TimeSpan time)
        {
            this.clock = clock;
            this.time = time;
        }

        public void Perform(float elapsedTime)
        {
            clock.Time = time;
        }

        public void Revert(float elapsedTime)
        {
            clock.Time = time - TimeSpan.FromSeconds(1);
        }
    }
}
